package com.sneaker.shower.mapstruct;

import com.sneaker.shower.entity.domain.order.GoodsItemDO;
import com.sneaker.shower.entity.dto.GoodsItemDTO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
@Mapper(componentModel = "spring")
public interface GoodsItemMapStruct {
    GoodsItemMapStruct INSTANCE = Mappers.getMapper(GoodsItemMapStruct.class);

    GoodsItemDO dto2DO(GoodsItemDTO goodsItemDTO);

    GoodsItemDTO do2DTO(GoodsItemDO goodsItemDO);

    List<GoodsItemDO> dtoList2DOList(List<GoodsItemDTO> goodsItemDTOList);

    List<GoodsItemDTO> doList2DTOList(List<GoodsItemDO> goodsItemDOList);
}
